<?php

namespace app\controllers\api;

use app\models\UserModel;
use app\controllers\ApiController;


class UserController extends ApiController
{
    public function info()
    {
        $params = $this->params;
        $arFail = ['status'=>'error', 'msg'=>'请求失败'];
//        if (empty($params['username']) || empty($params['password'])) {
//            $this->json($arFail);
//        }
//
//        $sName = $params['username'];
//        $sPass = $params['password'];
//
//        $UserModel = new UserModel();
//        $row = $UserModel->getByNamePass($sName, $sPass);
//
//        if ($row) {
//            $this->json(['status'=>'ok']);
//        }
        $arRes = array('status'=>'ok', 'roles'=>['admin']);
        $this->json($arRes);
    }

}